package com.darren.euc.repository;

import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

import com.darren.euc.entity.TemporaryOrder;

/**
 * Created by Machenike-Pc on 2018/4/3.
 */
public interface TemporaryOrderRepository extends PagingAndSortingRepository<TemporaryOrder,Integer>,JpaSpecificationExecutor {
	
	@Query(value = " select count(1) from temporary_order where datediff(now(),create_time) = 0 and id <= ?1  ",nativeQuery = true)
	Integer findCountById(Integer id);
	
}
